#box {
    position: relative;
    width: 500px;
    height: 500px;
    border: 1px solid #999;
}
#box div {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0px;
    left: 0px;
    background-color: blue;
    transition: all 500ms;
}